package DBWrapperFactory;

# $Id: DBWrapperFactory.pm 221 2010-07-12 18:58:17Z dolbanavt $
# $Date: 2010-07-12 21:58:28 +0300 (Пнд, 12 Июл 2010) $
# $HeadURL: https://robosearch.googlecode.com/svn/branches/reborn/lib/DBWrapperFactory.pm $
# $LastChangedRevision: 261 $

use JIP::ToolSet;
use Carp qw( croak );
use English qw( -no_match_vars );
use FactoryMethod;

our $VERSION = '1.0';

sub create_hosts_checker_wrapper {
    my $self  = shift;

    return FactoryMethod->_instantiate_class(
        class_name            => 'DBWrapper::HostsChecker',
        constructor_arguments => [ @ARG ],
        singleton_requested   => 0,
    );
}

sub create_crawler_manager_wrapper {
    my $self  = shift;

    return FactoryMethod->_instantiate_class(
        class_name            => 'DBWrapper::CrawlerManager',
        constructor_arguments => [ @ARG ],
        singleton_requested   => 0,
    );
}

sub create_builder_wrapper {
    my $self  = shift;

    return FactoryMethod->_instantiate_class(
        class_name            => 'DBWrapper::DatabaseBuilder',
        constructor_arguments => [ @ARG ],
        singleton_requested   => 0,
    );
}

1;

__END__

=head1 NAME

DBWrapperFactory - фабрика инстанцирующая объекты
семейства DBWrapper

=head1 SYNOPSIS

    use DBWrapperFactory;

    my $w = DBWrapperFactory->create_hosts_checker_wrapper();

    my $cm = DBWrapperFactory->create_crawler_manager_wrapper();

    my $bw = DBWrapperFactory->create_builder_wrapper();

=head1 DEPENDENCIES

JIP::ToolSet (from base_lib)

FactoryMethod (from base_lib)

=head1 AUTHOR

Vladimir Zhavoronkov, <dolbanavt (at) Google Mail>

http://dolbanavt.livejournal.com/

=head1 LICENSE AND COPYRIGHT

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

=cut
